package com.self.campussecondhandmarket.enums;

/**
 * Author: Vincent
 * <p> DateTime: 2024/4/18 22:32
 * <p> Description:
 * <p>
 **/
public enum ActionEnum {
	SHIPPING("发货中", "seller"),
	SERVED("送达", "songda"),
	CANCELED("已取消", "quxiao"),
	;
	String desc;
	String action;
	
	ActionEnum(String desc, String action) {
		this.desc = desc;
		this.action = action;
	}
	
	public static String getDesc(String action) {
		switch (action) {
			case "seller":
				return "发货中";
			case "songda":
				return "送达";
			case "quxiao":
				return "已取消";
			default:
				return "未知";
		}
	}
	
	public static String getAction(String desc) {
		switch (desc) {
			case "发货中":
				return "seller";
			case "送达":
				return "songda";
			case "已取消":
				return "quxiao";
			default:
				return "未知";
		}
	}
}
